home *** CD-ROM | disk | FTP | other *** search
- // ==================================================
- // touchMeReadme.cp
- // Copyright (C) 1996 Mizutori Tetsuya, July 4 1996, August 4, 1996.
- // ==================================================
- // All documents are pretty-printed in Geneva 10-point font.
-
- #ifdef COMMENT
-
- // --------------------------------------------------
- // CTouchMe Program Roadmap
- // --------------------------------------------------
-
- Global Variables:
- CTouchMePref *gPref - class object
- CTouchMeDialog *gDialog - class object
- LHelpMenu *gHelpMenu - the Help Menu
-
- // --------------------------------------------------
-
- CTouchMeApp
- * superclass: LDocApplication
- * function:
- +ObeyCommand() - Save settings data to preferences file if 'OK' button is selected
- +StartUp() - Execute once when launched by Finder's OpenApplication event
- +OpenDocument() - Execute every time whenever OpenDocument AppleEvent is sent
- - Do touch command, or fill date time stamp field if option-key is pressed
- +UseIdleTime() - Reset the status every time when a series of execution has finished
- +UpdateMenus() - Extra updates for Help Menu items
- +ShowAboutBox() - Override the procedure to make a patch for colored alert dialog
- +HandleAppleEvent() - My handling AppleEvent calls for HandleXXX() functions
- HandleGetPrefs() - For responding AppleScript command 'get prefs'
- HandleSetPrefs() - For responding AppleScript command 'set prefs'
- HandleLoadPrefs() - For responding AppleScript command 'load prefs'
- HandleSavePrefs() - For responding AppleScript command 'save prefs'
- HandleTouch() - For responding AppleScript command 'touch'
- HandleFetch() - For responding AppleScript command 'fetch'
- * variable:
- mOpenApplication - true if launched by the OpenApplication AppleEvent
- mOpenDocument - true if invoked by the OpenDocument AppleEvent
- mKeyModifier - Check the modifier key pressed on "Open..." ing command
- mCountDoc - Counter for execution times in the series of document files,
- - About resetting 'mCountDoc', see UseIdleTime() function above
- * resource:
- TouchMeAppleEvents.r
- - Resource definition for AppleEvent 'aedt' and 'aete'
-
- // --------------------------------------------------
-
- CTouchMePref
- * superclass: LPrefsFile
- * function:
- LoadPrefData() - Read the current settings data from preferences file
- SavePrefData() - Write the current settings data to preferences file
- SetXXX(*) - Set a member 'XXX' of settings data to some status
- GetXXX() - Get the status of the member 'XXX' of settings data
- * variable:
- mXXX - Each status of the member 'XXX' of settings data
- mPrefRec - A working data structure for handling preferences file
-
- // --------------------------------------------------
-
- CTouchMeDialog
- * superclass: LDialogBox, LBroadcaster, LDragAndDrop
- * function:
- GetGlobalFrameRect() - Get the global frame rect, a bound of dialog
- MoveDialog(pref) - Move the dialog window
- SetupDialog(pref) - Setup dialog status according to the 'pref' data
- InspectDialog(pref) - Set the 'pref' data according to the dialog status
- Indicator(*) - Show an indiactor whether the modifier key is pressed
-
- +ListenToMessage() - Control the synchronous RadioButton changes
- - Control the 'Current Date Time Now!' button, and others
- +FinishCreateSelf() - Add listeners of RadioButtons to broadcaster of LStdCheckBox
- - // Add listeners of CDateEditFields to broadcaster of CDateEditFields
- +DrawSelf() - Draw my additional figures in the dialog window
- +AttemptClose() - Quit program like as "Cancel" button if "Close Box" was selected
- +ItemIsAcceptable() - Drag&Drop; accept files or folders dropped from Finder
- +ReceiveDragItem() - Drag&Drop; retrieve the FSSpec from the dropped object
- - Set the date time stamp fields according to the accepted file
- - Or do touch command if option-key is pressed
- +EnterDropArea() - Drag&Drop; execute once if entered into the area
- +LeaveDropArea() - Drag&Drop; execute once if left from the area
- +InsideDropArea() - Drag&Drop; execute while staying in the area
- +HiliteDropArea() - Drag&Drop; assign my custum hilite region of EditFields
- * variable:
-
-
- // --------------------------------------------------
- // Common Utilities
- // --------------------------------------------------
-
- CDateEditField
- * superclass: LEditField, LListener, LBroadcaster
- * function:
- +ListenToMessage() - // Do nothing here
- +UserChangedText() - Set 'mHasChanged' to true if text has been changed
- +ClickSelf() - // Do nothing here
- +BeTarget() - // Do nothing here
- +DontBeTarget() - Call RefreshEditField() once after this EditField becomes no target
- GetTEActive() - Test the active status of TextEdit
- SetTEActive(*) - Set the active status of TextEdit
- GetSelect(*) - Get the selection of TextEdit
- SetSelect(*) - Set the selection of TextEdit
- GetText(*) - Read text string from this EditField
- SetText(*) - Write text string to this EditField
- SetTextAndRefresh(*) - Write text string, and then refresh it
- SetDateTime(*) - Convert date time seconds to string, and write it
- RefreshEditField() - Refresh the EditField if this text has been changed
- * variable:
- mHasChanged - true if text has been changed by user's action
-
- // --------------------------------------------------
-
- CRadioButton
- * superclass: LStdRadioButton
- * function:
- +ListenToMessage() - Listen to CheckBox and change its Enable/Disable status
-
- // --------------------------------------------------
-
- LPrefsFile
- * superclass: LPreferencesFile
- Constructor(name) - Create a FSSpec for the preferences file in the Preferences folder
- * function:
- LoadPref(*) - Read a block data from the preferences file
- SavePref(*) - Write a block data to the preferences file
-
- // --------------------------------------------------
-
- UDateTime
- * superclass: none
- * function:
- SecondsToDateTimeString(*)
- DateTimeStringToSeconds(*)
- - Convert date time data in 32-bit-lengh seconds to/from string
-
- // --------------------------------------------------
-
- UFileInfo
- * superclass: none
- * function:
- GetFSSpecDateTime() - Get the creation/modification date time of the given FSSpec
- SetFSSpecDateTime() - Set the creation/modification date time of the given FSSpec
- --
- GetSpecType(*) - Get the type of the given file; plain file, folder, or volume
- TouchDir(*) - Flush the volume cache to reflect the changes immediately
-
- // --------------------------------------------------
-
- LHelpMenu
- * superclass: LMenu
- * function:
- LHelpMenu() - Create LMenu for the Help Menu
- InstallMenu(*) - Add this LHelpMenu to the link table of the current MenuBar
- EnableItem() - Update the menu status to be enabled
-
- // --------------------------------------------------
-
- UErrorMessage
- * superclass: none
- * function:
- NofityIfOSErr(*) - Notify error message using Alert/Stop dialog
- * resource:
- ErrorMessage.r - Resource definition for error messages and alert dialog
-
- // --------------------------------------------------
-
- #endif // COMMENT
-